home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 January: Mac OS SDK / Dev.CD Jan 98 SDK1.toast / Development Kits (Disc 1) / Interfaces&Libraries / Universal / Interfaces / PInterfaces / OCETemplates.p < prev    next >
Encoding:
Text File  |  1997-08-12  |  86.6 KB  |  1,902 lines  |  [TEXT/MPS ]

  1. {
  2.      File:        OCETemplates.p
  3.  
  4.      Contains:    Apple Open Collaboration Environment Templates Interfaces.
  5.  
  6.      Version:    Technology:    AOCE Toolbox 1.02
  7.                  Release:    Universal Interfaces 3.0.1
  8.  
  9.      Copyright:    © 1994-1997 by Apple Computer, Inc., all rights reserved.
  10.  
  11.      Bugs?:        Please include the the file and version information (from above) with
  12.                  the problem description.  Developers belonging to one of the Apple
  13.                  developer programs can submit bug reports to:
  14.  
  15.                      devsupport@apple.com
  16.  
  17. }
  18. {$IFC UNDEFINED UsingIncludes}
  19. {$SETC UsingIncludes := 0}
  20. {$ENDC}
  21.  
  22. {$IFC NOT UsingIncludes}
  23.  UNIT OCETemplates;
  24.  INTERFACE
  25. {$ENDC}
  26.  
  27. {$IFC UNDEFINED __OCETEMPLATES__}
  28. {$SETC __OCETEMPLATES__ := 1}
  29.  
  30. {$I+}
  31. {$SETC OCETemplatesIncludes := UsingIncludes}
  32. {$SETC UsingIncludes := 1}
  33.  
  34. {$IFC UNDEFINED __TYPES__}
  35. {$I Types.p}
  36. {$ENDC}
  37. {$IFC UNDEFINED __EVENTS__}
  38. {$I Events.p}
  39. {$ENDC}
  40.  
  41. {$IFC UNDEFINED __OCE__}
  42. {$I OCE.p}
  43. {$ENDC}
  44.  
  45. {$IFC UNDEFINED __OCESTANDARDMAIL__}
  46. {$I OCEStandardMail.p}
  47. {$ENDC}
  48.  
  49.  
  50. {$PUSH}
  51. {$ALIGN MAC68K}
  52. {$LibExport+}
  53.  
  54.  
  55. {***********************************************************************************************
  56.  ********************************* Template Resource Constants: *********************************
  57.  ***********************************************************************************************}
  58.  
  59. { Current versions of all the different template types: }
  60.  
  61. CONST
  62.     kDETAspectVersion            = -976;
  63.     kDETInfoPageVersion            = -976;
  64.     kDETKillerVersion            = -976;
  65.     kDETForwarderVersion        = -976;
  66.     kDETFileTypeVersion            = -976;
  67.  
  68. {    "Normal" separation for template IDs within the file (this is just a suggestion; you can use whatever
  69.     separation you like, so long as two separate templates don't have overlapping resources): }
  70.     kDETIDSep                    = 250;
  71.  
  72. { A few predefined base IDs (again, just suggestions): }
  73.     kDETFirstID                    = 1000;
  74.     kDETSecondID                = 1250;
  75.     kDETThirdID                    = 1500;
  76.     kDETFourthID                = 1750;
  77.     kDETFifthID                    = 2000;
  78.  
  79. {    Templates consist of a set of associated resources, at constant offsets from a "base ID" set by the
  80.     signature resource of the template. In the case of aspect templates, most of the resources in the
  81.     template are accessible from the template as property default values. The property number is the same
  82.     as the offset from the base ID of the resource. In describing the resources which make up templates,
  83.     we give the type, the offset, and a description. For aspect templates, the offset is also the property #. 
  84.     
  85.     All templates include the following resource fork resources:
  86.  
  87.      Type    Offset                        Description
  88.      ----    ------                        -----------
  89.     'rstr'    kDETTemplateName            Contains the name of the template
  90.  
  91. }
  92.     kDETTemplateName            = 0;
  93.  
  94. {    Aspects, info-pages, and forwarders include the following as well:
  95.  
  96.      Type    Offset                        Description
  97.      ----    ------                        -----------
  98.     'rstr'    kDETRecordType                Contains the type of record this applies to
  99.     'rstr'    kDETAttributeType            Contains the type of attribute this applies to
  100.     'detn'    kDETAttributeValueTag        Contains the tag of the attribute values this applies to
  101.  
  102. }
  103.     kDETRecordType                = 1;
  104.     kDETAttributeType            = 2;
  105.     kDETAttributeValueTag        = 3;
  106.  
  107.  
  108. { ************************************ Aspects }
  109. {    In the case of aspects, property numbers and resource id offsets are the same. Therefore, some of the following
  110.     defines are used for resource offsets, some are used for dynamically generated properties, and some are used for
  111.     both (i.e., properties which may be dynamically generated, but if they aren't, then they're taken from the
  112.     resource). Resource types are given in all cases below; even if there is no actual resource (for example in
  113.     the case of kDETAspectName), it indicates the type for the dynamically generated property. A resource type of
  114.     'rstr' corresponds to a property type of kDETPrTypeString; type 'detn' corresponds to kDETPrTypeNumber; and
  115.     'detb' corresponds to kDETPrTypeBinary.
  116.  
  117.      Type    Offset                        Description
  118.      ----    ------                        -----------
  119.     'deta'    0                            Identifies the type of resource
  120.     'detc'    kDETCode                    Is the code resource, if any is used
  121.     'ICN#'    kDETAspectMainBitmap
  122.     'icl8'    kDETAspectMainBitmap
  123.     'icl4'    kDETAspectMainBitmap
  124.     'ics#'    kDETAspectMainBitmap
  125.     'ics8'    kDETAspectMainBitmap
  126.     'ics4'    kDETAspectMainBitmap
  127.     'sicn'    kDETAspectMainBitmap        Is the icon suite to display for this item type (main aspect only)
  128.     'rstr'    kDETAspectName                Contains the name of the item (attribute main aspect only)
  129.     'rst#'    kDETAspectCategory            Contains the internal categories for the record type (main aspect only)
  130.     'rst#'    kDETAspectExternalCategory    Contains the external (user-visible) names which correspond to the categories in
  131.                                         kDETAspectCategory; if this resource is not present, external names are taken from
  132.                                         another template; if no other template provides an external name for a given internal
  133.                                         category, the internal name is used as the external name (main aspect only)
  134.     'rstr'    kDETAspectKind                Is the item kind to display (main aspect only)
  135.     'detn'    kDETAspectGender            Is the gender of this kind of object for internationalization (main aspect only)
  136.     'rstr'    kDETAspectWhatIs            Is the string for balloon help when item is in sublist (main aspect only)
  137.     'rstr'    kDETAspectAliasKind            Is the item kind to display for aliases to this type of item (main aspect only)
  138.     'detn'    kDETAspectAliasGender        Is the gender of an alias to this kind of object for internationalization (main aspect only)
  139.     'rstr'    kDETAspectAliasWhatIs        Is the string for balloon help when an alias to the item is in sublist (main aspect only)
  140.     'rst#'    kDETAspectBalloons            Is a list of strings for balloon help; for each item in an info-page, it's
  141.                                         property # times 2 is used as an index into this array; if the item is not editable,
  142.                                         then the property # times 2 plus 1 is used
  143.     'rstr'    kDETAspectNewMenuName        Is the string to be used for the user to select new item creation; for records, the
  144.                                         string is used as a menu entry in the Catalogs menu; for attributes, the string
  145.                                         is used in a selection dialog invoked by an "Add..." button
  146.     'rstr'    kDETAspectNewEntryName        Is the name to be used for new records (with a digit appended if not unique)
  147.     'detb'    kDETAspectNewValue            Is the value to use when creating a new attribute value; the first four bytes
  148.                                         is the tag; the rest is the attribute value contents
  149.     'detn'    kDETAspectSublistOpenOnNew    If true (non-zero), automatically open newly created entries (property can be set
  150.                                         from a code resource, or via a default value in a resource)
  151.     'dett'    kDETAspectLookup            Is the attribute-to-property translation table
  152.     'rstr'    kDETAspectDragInString        Is a string describing the action of dragging into this aspect (if any)
  153.     'rstr'    kDETAspectDragInVerb        Is a single, short word that's the verb of the action (like "add" or "drop"; if
  154.                                         there's any doubt, use "OK")
  155.     'rstr'    kDETAspectDragInSummary        Is a short phrase that describes the action, suitable to be included in a selection list
  156.     'rst#'    kDETAspectRecordDragIn        Is a list of type pairs; in each pair, the first is the type of a record which
  157.                                         can be dragged into this aspect, and the second is the attribute type to store
  158.                                         the reference in
  159.     'rst#'    kDETAspectRecordCatDragIn    Is a list of category/attribute type pairs; in each pair, the first is the
  160.                                         category of records which can be dragged in, and the second is the type of
  161.                                         attribute to place the alias in
  162.     'rst#'    kDETAspectAttrDragIn        Is a list of type triples; in each triple, the first is the record type which can be
  163.                                         dragged from (or "" for any), the second is the attribute type which can be dragged
  164.                                         in, and the third is the attribute type to store the new attribute in
  165.     'rst#'    kDETAspectDragOut            Is a list of attribute types which can be dragged out of this aspect (an 'rst#'
  166.                                         resource with no entries means nothing can be dragged out; no 'rst#' resource means
  167.                                         everything can be dragged out)
  168.     'detm'    kDETAspectViewMenu            Is a table to fill in the view menu from
  169.     'detp'    kDETAspectReverseSort        Is a table listing which properties to sort in reverse order
  170.     'detw'    kDETAspectInfoPageCustomWindow    Is a specification of a custom window size/placement & whether to use the
  171.                                             page-selector (main aspect only)
  172.     'detv'    kDETAspectInfoPageCustomWindow    Is a view list which is common to all info-pages (main aspect only)
  173. }
  174.     kDETAspectCode                = 4;
  175.     kDETAspectMainBitmap        = 5;
  176.     kDETAspectName                = 6;
  177.     kDETAspectCategory            = 7;
  178.     kDETAspectExternalCategory    = 8;
  179.     kDETAspectKind                = 9;
  180.     kDETAspectGender            = 10;
  181.     kDETAspectWhatIs            = 11;
  182.     kDETAspectAliasKind            = 12;
  183.     kDETAspectAliasGender        = 13;
  184.     kDETAspectAliasWhatIs        = 14;
  185.     kDETAspectBalloons            = 15;
  186.     kDETAspectNewMenuName        = 16;
  187.     kDETAspectNewEntryName        = 17;
  188.     kDETAspectNewValue            = 18;
  189.     kDETAspectSublistOpenOnNew    = 19;
  190.     kDETAspectLookup            = 20;
  191.     kDETAspectDragInString        = 21;
  192.     kDETAspectDragInVerb        = 22;
  193.     kDETAspectDragInSummary        = 23;
  194.     kDETAspectRecordDragIn        = 24;
  195.     kDETAspectRecordCatDragIn    = 25;
  196.     kDETAspectAttrDragIn        = 26;
  197.     kDETAspectAttrDragOut        = 27;
  198.     kDETAspectViewMenu            = 28;
  199.     kDETAspectReverseSort        = 29;
  200.     kDETAspectInfoPageCustomWindow = 30;
  201.  
  202. { Properties: }
  203.     kDETNoProperty                = -1;
  204.  
  205. { Each aspect has 250 attribute properties in this range: }
  206.     kDETFirstLocalProperty        = 0;
  207.     kDETLastLocalProperty        = 249;
  208.  
  209. { Developers should use property numbers starting at this point: }
  210.     kDETFirstDevProperty        = 40;
  211.  
  212. { The following range provides constant numeric properties for use in patterns and comparisons (constant n is
  213.   
  214.    given by kDETFirstConstantProperty+n): }
  215.     kDETFirstConstantProperty    = 250;
  216.     kDETLastConstantProperty    = 499;
  217.  
  218. { To convert a number into a constant property, add this: }
  219.     kDETConstantProperty        = 250;
  220.     kDETZeroProperty            = 250;
  221.     kDETOneProperty                = 251;
  222.     kDETFalseProperty            = 250;
  223.     kDETTrueProperty            = 251;
  224.  
  225. { The following apply to records, attributes, or aliases; they are the name and kind, as they appear in icon lists: }
  226.     kDETPrName                    = 3050;
  227.     kDETPrKind                    = 3051;
  228.  
  229. { Access mask properties: }
  230.     kDETDNodeAccessMask            = 25825;                        {  The DNode access mask  }
  231.     kDETRecordAccessMask        = 25826;                        {  The record access mask  }
  232.     kDETAttributeAccessMask        = 25827;                        {  The attribute access mask  }
  233.     kDETPrimaryMaskByBit        = 25828;                        {  A set of sixteen properties to access all bits of the primary mask  }
  234.  
  235. { See AOCE documentation for details definitions of each of these bits: }
  236.     kDETPrimarySeeMask            = 25828;
  237.     kDETPrimaryAddMask            = 25829;
  238.     kDETPrimaryDeleteMask        = 25830;
  239.     kDETPrimaryChangeMask        = 25831;
  240.     kDETPrimaryRenameMask        = 25832;
  241.     kDETPrimaryChangePrivsMask    = 25833;
  242.     kDETPrimaryTopMaskBit        = 25843;
  243.  
  244. { The following property is zero until we've completed the first catalog lookup; from then on it's 1 }
  245.     kDETPastFirstLookup            = 26550;
  246.  
  247. { The following property is the page number; issuing a property command with this property will flip info-pages }
  248.     kDETInfoPageNumber            = 27050;
  249.  
  250. { The value of the following properties contains the template number of the targeted aspect's template, and the
  251.    currently open info-page (if any). These values can be used with kDETAspectTemplate and kDETInfoPageTemplate
  252.    target selectors. }
  253.     kDETAspectTemplateNumber    = 26551;
  254.     kDETInfoPageTemplateNumber    = 26552;
  255.  
  256. { Properties for property commands to deal with sublist items: }
  257.     kDETOpenSelectedItems        = 26553;                        {  Open selected sublist items  }
  258.     kDETAddNewItem                = 26554;                        {  Add new sublist item  }
  259.     kDETRemoveSelectedItems        = 26555;                        {  Remove selected sublist items  }
  260.  
  261. { Property types are used to specify types of properties and conversions between types (zero and negative numbers
  262.    are reserved for Apple; developer code resources can use positive numbers): }
  263.     kDETPrTypeNumber            = -1;                            {  A number  }
  264.     kDETPrTypeString            = -2;                            {  A string  }
  265.     kDETPrTypeBinary            = -3;                            {  A binary block  }
  266.  
  267. { ************************************ Info-pages }
  268. { Info-pages include the following as well:
  269.  
  270.      Type    Offset                        Description
  271.      ----    ------                        -----------
  272.     'deti'    0                            Identifies the type of resource; see below for details on the contents
  273.     'rstr'    kDETInfoPageName            Is the name of the view to use in the page selection pop-up
  274.     'rstr'    kDETInfoPageMainViewAspect    Is the name of the aspect to use with the main page view
  275.     'rstr'    kDETInfoPageMenuName        Is the name of the catalogs menu ("Catalogs" if not present)
  276.     'detm'    kDETInfoPageMenuEntries        Are menu entries to go in the Catalogs menu
  277.  
  278. }
  279.     kDETInfoPageName            = 4;
  280.     kDETInfoPageMainViewAspect    = 5;
  281.     kDETInfoPageMenuName        = 6;
  282.     kDETInfoPageMenuEntries        = 7;
  283.  
  284.  
  285. { ************************************ Views 
  286.  
  287.    Flags: }
  288.     kDETNoFlags                    = 0;                            {  Main view (non-sublist) field enabled  }
  289.     kDETEnabled                    = $01;
  290.  
  291. { The following flags make sense for items in a sublist only }
  292.                                                                 {  Hilight view when entry is selected  }
  293.     kDETHilightIfSelected        = $01;
  294.  
  295. { The following flags make sense for text views only }
  296.     kDETNumericOnly                = $08;                            {  Only allow the user to enter digits  }
  297.     kDETMultiLine                = $10;                            {  Allow multiple lines in view  }
  298.     kDETDynamicSize                = $0200;                        {  Don't draw box around text until user clicks in it, then auto-size it  }
  299.                                                                 {  Don't allow the user to enter colons (convert ":"s to "-"s)  }
  300.     kDETAllowNoColons            = $0400;
  301.  
  302. { The following flags are used for pop-up menus only }
  303.                                                                 {  Automatically resize pop-up based on contents  }
  304.     kDETPopupDynamicSize        = $0100;
  305.  
  306. { The following flags are used for EditPicture views only }
  307.                                                                 {  Scale picture to view bounds rather than cropping  }
  308.     kDETScaleToView                = $0100;
  309.  
  310. {    Sizes for icons }
  311.     kDETLargeIcon                = 0;
  312.     kDETSmallIcon                = 1;
  313.     kDETMiniIcon                = 2;
  314.  
  315. { Stolen from TextEdit.h }
  316.     kDETLeft                    = 0;
  317.     kDETCenter                    = 1;
  318.     kDETRight                    = -1;
  319.     kDETForceLeft                = -2;
  320.  
  321. { Flags for use within Box view type attributes - these are distinct from the flags above }
  322.     kDETUnused                    = 0;
  323.     kDETBoxTakesContentClicks    = $01;
  324.     kDETBoxIsRounded            = $02;
  325.     kDETBoxIsGrayed                = $04;
  326.     kDETBoxIsInvisible            = $08;
  327.  
  328. { The common font info }
  329.     kDETApplicationFont            = 1;
  330.     kDETApplicationFontSize        = 9;
  331.     kDETAppFontLineHeight        = 12;
  332.     kDETSystemFont                = 0;
  333.     kDETSystemFontSize            = 12;
  334.     kDETSystemFontLineHeight    = 16;
  335.     kDETDefaultFont                = 1;
  336.     kDETDefaultFontSize            = 9;
  337.     kDETDefaultFontLineHeight    = 12;
  338.  
  339. {    These were taken from QuickDraw.h (where they're enums and therefore unusable in resource definitions): }
  340.     kDETNormal                    = 0;
  341.     kDETBold                    = 1;
  342.     kDETItalic                    = 2;
  343.     kDETUnderline                = 4;
  344.     kDETOutline                    = 8;
  345.     kDETShadow                    = $10;
  346.     kDETCondense                = $20;
  347.     kDETExtend                    = $40;
  348.  
  349.     kDETIconStyle                = -3;                            {  Normal text style for regular sublist entries, italic text style for aliases  }
  350.  
  351. { View menu: }
  352.     kDETChangeViewCommand        = 'view';                        {  Change the view; used especially in StaticCommandTextFromView sublist headers  }
  353.  
  354. { Info-page window sizes: }
  355. { Default record info-pages: }
  356.     kDETRecordInfoWindHeight    = 228;
  357.     kDETRecordInfoWindWidth        = 400;
  358.  
  359. { Default attribute info-pages: }
  360.     kDETAttributeInfoWindHeight    = 250;
  361.     kDETAttributeInfoWindWidth    = 230;
  362.  
  363. { Page identifying icon (for default info-page layout): }
  364.     kDETSubpageIconTop            = 8;
  365.     kDETSubpageIconLeft            = 8;
  366.     kDETSubpageIconBottom        = 40;
  367.     kDETSubpageIconRight        = 40;
  368.  
  369. { ************************************ Killers 
  370.  
  371.    Killers include the following as well:
  372.  
  373.      Type    Offset                        Description
  374.      ----    ------                        -----------
  375.     'detk'    0                            Identifies the type of resource; see below for details on the contents
  376.     'rst#'    kDETKillerName                Contains a list of template names to be killed
  377.  
  378. }
  379.     kDETKillerName                = 1;
  380.  
  381. { ************************************ Forwarders 
  382.  
  383.    Forwarders include the following as well:
  384.  
  385.      Type    Offset                        Description
  386.      ----    ------                        -----------
  387.     'detf'    0                            Identifies the type of resource; see below for details on the contents
  388.     'rst#'    kDETForwarderTemplateNames    Contains a list of names of templates to forward to
  389.  
  390. }
  391.     kDETForwarderTemplateNames    = 4;
  392.  
  393. {*********************************************************************************}
  394. {******************************** Code Resources: ********************************}
  395. {*********************************************************************************}
  396. { Target specification: }
  397.     kDETSelf                    = 0;                            {  The "current" item  }
  398.     kDETSelfOtherAspect            = 1;                            {  Another aspect of the current item  }
  399.     kDETParent                    = 2;                            {  The parent (i.e., the aspect we're in the sublist of, if any) of the current item  }
  400.     kDETSublistItem                = 3;                            {  The itemNumberth item in the sublist  }
  401.     kDETSelectedSublistItem        = 4;                            {  The itemNumberth selected item in the sublist  }
  402.     kDETDSSpec                    = 5;                            {  The item specified by the packed DSSpec  }
  403.     kDETAspectTemplate            = 6;                            {  A specific aspect template (number itemNumber)  }
  404.     kDETInfoPageTemplate        = 7;                            {  A specific info-page template (number itemNumber) * Force type to be short  }
  405.     kDETHighSelector            = $F000;
  406.  
  407.  
  408. TYPE
  409.     DETTargetSelector                    = LONGINT;
  410.     DETTargetSpecificationPtr = ^DETTargetSpecification;
  411.     DETTargetSpecification = RECORD
  412.         selector:                DETTargetSelector;                        {  Target selection method (see above)  }
  413.         aspectName:                RStringPtr;                                {  The name of the aspect (kDETSelfOtherAspect, kDETSublistItem, }
  414.                                                                         {    kDETSelectedSublistItem, kDETDSSpec); nil for main aspect or none;  }
  415.                                                                         {   always filled in for calls if there is an aspect, even if it's the main aspect  }
  416.         itemNumber:                LONGINT;                                {  Sublist index (kDETSublistItem & kDETSelectedSublistItem & kDETAspectTemplate); }
  417.                                                                         {    1-based indexing  }
  418.         dsSpec:                    PackedDSSpecPtr;                        {  DSSpec (kDETDSSpec only)  }
  419.     END;
  420.  
  421. { Code resource calls and call-backs both return an OSType:
  422.         kDETDidNotHandle (1)    = used by template to say "I didn't handle it" (for calls only)
  423.         noErr                    = function completed successfully
  424.         any error                = function failed, and here's why
  425. }
  426. { Call-back functions:
  427.  
  428.         reqFunction                            Action
  429.         -----------                            ------
  430.         kDETcmdBeep                            Call SysBeep; useful for testing that a code resource's calls/call-backs are working at all
  431.  
  432.         kDETcmdBusy                            Put up watch cursor and switch processes; user events elicit a beep
  433.  
  434.         kDETcmdChangeCallFors                Change call-fors mask
  435.  
  436.         kDETcmdGetCommandSelectionCount        Get the command selection count (for calls which have a command selection list)
  437.         kDETcmdGetCommandItemN                Get command selection item n (for calls which have a command selection list)
  438.  
  439.         kDETcmdOpenDSSpec                    PackedDSSpec open (can also be done via AppleEvents -- this is a short-cut)
  440.  
  441.         kDETcmdAboutToTalk                    About to talk to user: bring us to front, disable watch cursor, etc.
  442.  
  443.         kDETcmdUnloadTemplates                Flush templates
  444.  
  445.         kDETcmdTemplateCounts                Return number of aspect and info-page templates in system
  446.  
  447.         kDETcmdGetDSSpec                    Get the PackedDSSpec for this object
  448.  
  449.         kDETcmdSublistCount                    Return the count of the sublist items
  450.         kDETcmdSelectedSublistCount            Return the count of the selected sublist items
  451.  
  452.         kDETcmdRequestSync                    Request a sync-up of the aspect with the catalog
  453.  
  454.         kDETcmdBreakAttribute                Break an attribute -- apply all applicable patterns to an attribute to generate properties
  455.  
  456.         kDETcmdGetTemplateFSSpec            Get the FSSpec of the file containing the template
  457.  
  458.         kDETcmdGetOpenEdit                    Return the property of the view being edited (or kDETNoProperty if none)
  459.         kDETcmdCloseEdit                    Close the current edit
  460.  
  461.         kDETcmdGetPropertyType                Get a property type
  462.  
  463.         kDETcmdGetPropertyNumber            Get a property, number format
  464.         kDETcmdGetPropertyRString            Get a property, RString format
  465.         kDETcmdGetPropertyBinarySize        Get a property, binary, return size
  466.         kDETcmdGetPropertyBinary            Get a property, binary format
  467.  
  468.         kDETcmdGetPropertyChanged            Get a property changed flag
  469.         kDETcmdGetPropertyEditable            Get a property editable flag
  470.  
  471.         kDETcmdSetPropertyType                Set a property type
  472.  
  473.         kDETcmdSetPropertyNumber            Set a property, number format
  474.         kDETcmdSetPropertyRString            Set a property, RString format
  475.         kDETcmdSetPropertyBinary            Set a property, binary data & size
  476.  
  477.         kDETcmdSetPropertyChanged            Set a property changed flag
  478.         kDETcmdSetPropertyEditable            Set a property editable flag
  479.  
  480.         kDETcmdDirtyProperty                Dirty a property (notify other code resources of change)
  481.  
  482.         kDETcmdDoPropertyCommand            Issue a property command
  483.  
  484.         kDETcmdAddMenu                        Add to the end of a dynamic menu
  485.         kDETcmdRemoveMenu                    Remove a dynamic menu item
  486.         kDETcmdMenuItemRString                Get a dynamic menu item RString
  487.  
  488.         kDETcmdSaveProperty                    Force a save of a property -- apply all applicable patterns to write out the property
  489.  
  490.         kDETcmdGetCustomViewUserReference    Get custom view user reference (as given in .r file)
  491.         kDETcmdGetCustomViewBounds            Get custom view current bounds
  492.  
  493.         kDETcmdGetResource                    Get a resource from a template
  494. }
  495.  
  496.  
  497. CONST
  498.     kDETcmdSimpleCallback        = 0;
  499.     kDETcmdBeep                    = 1;
  500.     kDETcmdBusy                    = 2;
  501.     kDETcmdChangeCallFors        = 3;
  502.     kDETcmdGetCommandSelectionCount = 4;
  503.     kDETcmdGetCommandItemN        = 5;
  504.     kDETcmdOpenDSSpec            = 6;
  505.     kDETcmdAboutToTalk            = 7;
  506.     kDETcmdUnloadTemplates        = 8;
  507.     kDETcmdTemplateCounts        = 9;
  508.     kDETcmdTargetedCallback        = 1000;
  509.     kDETcmdGetDSSpec            = 1001;
  510.     kDETcmdSublistCount            = 1002;
  511.     kDETcmdSelectedSublistCount    = 1003;
  512.     kDETcmdRequestSync            = 1004;
  513.     kDETcmdBreakAttribute        = 1005;
  514.     kDETcmdGetTemplateFSSpec    = 1006;
  515.     kDETcmdGetOpenEdit            = 1007;
  516.     kDETcmdCloseEdit            = 1008;
  517.     kDETcmdPropertyCallback        = 2000;
  518.     kDETcmdGetPropertyType        = 2001;
  519.     kDETcmdGetPropertyNumber    = 2002;
  520.     kDETcmdGetPropertyRString    = 2003;
  521.     kDETcmdGetPropertyBinarySize = 2004;
  522.     kDETcmdGetPropertyBinary    = 2005;
  523.     kDETcmdGetPropertyChanged    = 2006;
  524.     kDETcmdGetPropertyEditable    = 2007;
  525.     kDETcmdSetPropertyType        = 2008;
  526.     kDETcmdSetPropertyNumber    = 2009;
  527.     kDETcmdSetPropertyRString    = 2010;
  528.     kDETcmdSetPropertyBinary    = 2011;
  529.     kDETcmdSetPropertyChanged    = 2012;
  530.     kDETcmdSetPropertyEditable    = 2013;
  531.     kDETcmdDirtyProperty        = 2014;
  532.     kDETcmdDoPropertyCommand    = 2015;
  533.     kDETcmdAddMenu                = 2016;
  534.     kDETcmdRemoveMenu            = 2017;
  535.     kDETcmdMenuItemRString        = 2018;
  536.     kDETcmdSaveProperty            = 2019;
  537.     kDETcmdGetCustomViewUserReference = 2020;
  538.     kDETcmdGetCustomViewBounds    = 2021;
  539.     kDETcmdGetResource            = 2022;                            {  Force type to be long  }
  540.     kDETcmdHighCallback            = $F0000000;
  541.  
  542.  
  543. TYPE
  544.     DETCallBackFunctions                = LONGINT;
  545. { Call functions:
  546.  
  547.         reqFunction                        Action
  548.         -----------                        ------
  549.         kDETcmdInit                        Called once when template is first loaded (good time to allocate private data); returns call-for list
  550.         kDETcmdExit                        Called once when template is freed (good time to free private data)
  551.  
  552.         kDETcmdAttributeCreation        New sublist attribute creation about to occur; this gives the template a chance to modify
  553.                                         the value that's about to be created; sent to the template that will be used for
  554.                                         the main aspect of the new entry
  555.  
  556.         kDETcmdDynamicForwarders        Return a list of dynamically created forwarders
  557.  
  558.         kDETcmdInstanceInit                Called once when instance of template is started (good time to allocate private instance data)
  559.         kDETcmdInstanceExit                Called once when instance is ended (good time to free private instance data)
  560.  
  561.         kDETcmdIdle                        Called periodically during idle times
  562.  
  563.         kDETcmdViewListChanged            Called when the info-page view-list (list of enabled views) has changed
  564.  
  565.         kDETcmdValidateSave                Validate save: about to save info-page, return noErr (or kDETDidNotHandle) if it's OK to do so
  566.  
  567.         kDETcmdDropQuery                Drop query: return the appropriate operation for this drag; ask destination
  568.         kDETcmdDropMeQuery                Drop query: return the appropriate operation for this drag; ask dropee
  569.  
  570.         kDETcmdAttributeNew                Attribute value new (return kDETDidNotHandle to let normal new processing occur)
  571.         kDETcmdAttributeChange            Attribute value change (return kDETDidNotHandle to let normal change processing occur)
  572.         kDETcmdAttributeDelete            Attribute value delete (return kDETDidNotHandle to let normal deletion occur); sent to the
  573.                                         main aspect of the attribute that's about to be deleted
  574.         kDETcmdItemNew                    Target item (record or attribute) has just been created
  575.  
  576.         kDETcmdOpenSelf                    Self open (return noErr to prevent opening; return kDETDidNotHandle to allow it)
  577.  
  578.         kDETcmdDynamicResource            Return a dynamically created resource
  579.  
  580.         kDETcmdShouldSync                Check if the code resource wants to force a sync (update data from catalog)
  581.         kDETcmdDoSync                    Give code resource a chance to sync (read in and break all attributes)
  582.  
  583.         kDETcmdPropertyCommand            Command received in the property number range (usually means a button's been pushed)
  584.  
  585.         kDETcmdMaximumTextLength        Return maximum size for text form of property
  586.  
  587.         kDETcmdPropertyDirtied            Property dirtied, need to redraw
  588.  
  589.         kDETcmdPatternIn                Custom pattern element encountered on reading in an attribute
  590.         kDETcmdPatternOut                Custom pattern element encountered on writing out an attribute
  591.  
  592.         kDETcmdConvertToNumber            Convert from template-defined property type to number
  593.         kDETcmdConvertToRString            Convert from template-defined property type to RString
  594.         kDETcmdConvertFromNumber        Convert from number to template-defined property type
  595.         kDETcmdConvertFromRString        Convert from RString to template-defined property type
  596.  
  597.         kDETcmdCustomViewDraw            Custom view draw
  598.         kDETcmdCustomViewMouseDown        Custom view mouse down
  599.  
  600.         kDETcmdKeyPress                    Key press (used primarily to filter entry into EditText views)
  601.         kDETcmdPaste                    Paste (used primarily to filter entry into EditText views)
  602.  
  603.         kDETcmdCustomMenuSelected        Custom Catalogs menu selected
  604.         kDETcmdCustomMenuEnabled        Return whether custom Catalogs menu entry should be enabled
  605. }
  606.  
  607.  
  608. CONST
  609.     kDETcmdSimpleCall            = 0;
  610.     kDETcmdInit                    = 1;
  611.     kDETcmdExit                    = 2;
  612.     kDETcmdAttributeCreation    = 3;
  613.     kDETcmdDynamicForwarders    = 4;
  614.     kDETcmdTargetedCall            = 1000;
  615.     kDETcmdInstanceInit            = 1001;
  616.     kDETcmdInstanceExit            = 1002;
  617.     kDETcmdIdle                    = 1003;
  618.     kDETcmdViewListChanged        = 1004;
  619.     kDETcmdValidateSave            = 1005;
  620.     kDETcmdDropQuery            = 1006;
  621.     kDETcmdDropMeQuery            = 1007;
  622.     kDETcmdAttributeNew            = 1008;
  623.     kDETcmdAttributeChange        = 1009;
  624.     kDETcmdAttributeDelete        = 1010;
  625.     kDETcmdItemNew                = 1011;
  626.     kDETcmdOpenSelf                = 1012;
  627.     kDETcmdDynamicResource        = 1013;
  628.     kDETcmdShouldSync            = 1014;
  629.     kDETcmdDoSync                = 1015;
  630.     kDETcmdPropertyCall            = 2000;
  631.     kDETcmdPropertyCommand        = 2001;
  632.     kDETcmdMaximumTextLength    = 2002;
  633.     kDETcmdPropertyDirtied        = 2003;
  634.     kDETcmdPatternIn            = 2004;
  635.     kDETcmdPatternOut            = 2005;
  636.     kDETcmdConvertToNumber        = 2006;
  637.     kDETcmdConvertToRString        = 2007;
  638.     kDETcmdConvertFromNumber    = 2008;
  639.     kDETcmdConvertFromRString    = 2009;
  640.     kDETcmdCustomViewDraw        = 2010;
  641.     kDETcmdCustomViewMouseDown    = 2011;
  642.     kDETcmdKeyPress                = 2012;
  643.     kDETcmdPaste                = 2013;
  644.     kDETcmdCustomMenuSelected    = 2014;
  645.     kDETcmdCustomMenuEnabled    = 2015;
  646.     kDETcmdHighCall                = $F0000000;                    {  Force the type to be long  }
  647.  
  648.  
  649. TYPE
  650.     DETCallFunctions                    = LONGINT;
  651. { Valid commandIDs for DETDropQueryBlock and DETDropMeQueryBlock (in addition to property numbers): }
  652.  
  653. CONST
  654.     kDETDoNothing                = 'xxx0';
  655.     kDETMove                    = 'move';
  656.     kDETDrag                    = 'drag';
  657.     kDETAlias                    = 'alis';
  658.  
  659.  
  660.  
  661. TYPE
  662.     DETProtoCallBackBlockPtr = ^DETProtoCallBackBlock;
  663.     DETProtoCallBackBlock = RECORD
  664.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  665.         target:                    DETTargetSpecification;                    {  The target for the request  }
  666.         property:                INTEGER;                                {  The property to apply the request to  }
  667.     END;
  668.  
  669.     DETBeepBlockPtr = ^DETBeepBlock;
  670.     DETBeepBlock = RECORD
  671.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  672.     END;
  673.  
  674.     DETBusyBlockPtr = ^DETBusyBlock;
  675.     DETBusyBlock = RECORD
  676.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  677.     END;
  678.  
  679.     DETChangeCallForsBlockPtr = ^DETChangeCallForsBlock;
  680.     DETChangeCallForsBlock = RECORD
  681.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  682.         target:                    DETTargetSpecification;                    {  The target for the request  }
  683.         newCallFors:            LONGINT;                                {   -> New call-for mask  }
  684.     END;
  685.  
  686.     DETGetCommandSelectionCountBlockPtr = ^DETGetCommandSelectionCountBlock;
  687.     DETGetCommandSelectionCountBlock = RECORD
  688.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  689.         count:                    LONGINT;                                {  <-  The number of items in the command selection list  }
  690.     END;
  691.  
  692.  
  693. CONST
  694.     kDETHFSType                    = 0;                            {  HFS item type  }
  695.     kDETDSType                    = 1;                            {  Catalog Service item type  }
  696.     kDETMailType                = 2;                            {  Mail (letter) item type  }
  697.     kDETMoverType                = 3;                            {  Sounds, fonts, etc., from inside a suitcase or system file  }
  698.     kDETLastItemType            = $F0000000;                    {  Force it to be a long (C & C++ seem to disagree about the definition of 0xF000)  }
  699.  
  700.  
  701. TYPE
  702.     DETItemType                            = LONGINT;
  703. { FSSpec plus possibly interesting additional info }
  704.     DETFSInfoPtr = ^DETFSInfo;
  705.     DETFSInfo = RECORD
  706.         fileType:                OSType;                                    {  File type  }
  707.         fileCreator:            OSType;                                    {  File creator  }
  708.         fdFlags:                INTEGER;                                {  Finder flags  }
  709.         fsSpec:                    FSSpec;                                    {  FSSpec  }
  710.     END;
  711.  
  712.     DSRecPtr = ^DSRec;
  713.     DSRec = RECORD
  714.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  715.         refNum:                    INTEGER;                                {  <-  Refnum for returned address  }
  716.         identity:                AuthIdentity;                            {  <-  Identity for returned address  }
  717.     END;
  718.  
  719.     ItemRecPtr = ^ItemRec;
  720.     ItemRec = RECORD
  721.         CASE INTEGER OF
  722.         0: (
  723.             fsInfo:                ^DETFSInfoPtr;                            {  <-  FSSpec & info for item (caller must DisposHandle() when done)  }
  724.             );
  725.         1: (
  726.             ds:                    DSRec;
  727.             );
  728.         2: (
  729.             dsSpec:                ^PackedDSSpecPtr;                        {  <-  DSSpec for item (caller must DisposHandle() when done)  }
  730.             );
  731.         3: (
  732.             ltrSpec:            ^LetterSpecPtr;                            {  <-  Letter spec for item (caller must DisposHandle() when done)  }
  733.             );
  734.     END;
  735.  
  736.     DETGetCommandItemNBlockPtr = ^DETGetCommandItemNBlock;
  737.     DETGetCommandItemNBlock = RECORD
  738.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  739.         itemNumber:                LONGINT;                                {   -> Item number to retrieve (1-based)  }
  740.         itemType:                DETItemType;                            {   -> Type of item to be returned (if we can interpret it as such)  }
  741.         item:                    ItemRec;
  742.     END;
  743.  
  744.     DETGetDSSpecBlockPtr = ^DETGetDSSpecBlock;
  745.     DETGetDSSpecBlock = RECORD
  746.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  747.         target:                    DETTargetSpecification;                    {  The target for the request  }
  748.         dsSpec:                    ^PackedDSSpecPtr;                        {  <-  Handle with result (caller must DisposHandle() when done)  }
  749.         refNum:                    INTEGER;                                {  <-  Refnum for address if PD  }
  750.         identity:                AuthIdentity;                            {  <-  Identity for address  }
  751.         isAlias:                BOOLEAN;                                {  <-  True if this entry is an alias  }
  752.         isRecordRef:            BOOLEAN;                                {  <-  True if this entry is a record reference (reserved)  }
  753.     END;
  754.  
  755.     DETGetTemplateFSSpecBlockPtr = ^DETGetTemplateFSSpecBlock;
  756.     DETGetTemplateFSSpecBlock = RECORD
  757.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  758.         target:                    DETTargetSpecification;                    {  The target for the request  }
  759.         fsSpec:                    FSSpec;                                    {  <-  FSSpec of template file  }
  760.         baseID:                    INTEGER;                                {  <-  Base ID of this template  }
  761.         aspectTemplateNumber:    LONGINT;                                {  <-  The template number for this aspect template  }
  762.     END;
  763.  
  764.     DETGetOpenEditBlockPtr = ^DETGetOpenEditBlock;
  765.     DETGetOpenEditBlock = RECORD
  766.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  767.         target:                    DETTargetSpecification;                    {  The target for the request  }
  768.         viewProperty:            INTEGER;                                {  <-  The property of the view being edited (or kNoProperty if none)  }
  769.     END;
  770.  
  771.     DETCloseEditBlockPtr = ^DETCloseEditBlock;
  772.     DETCloseEditBlock = RECORD
  773.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  774.         target:                    DETTargetSpecification;                    {  The target for the request  }
  775.     END;
  776.  
  777.     DETGetPropertyTypeBlockPtr = ^DETGetPropertyTypeBlock;
  778.     DETGetPropertyTypeBlock = RECORD
  779.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  780.         target:                    DETTargetSpecification;                    {  The target for the request  }
  781.         property:                INTEGER;                                {  The property to apply the request to  }
  782.         propertyType:            INTEGER;                                {  <-  The type of the property  }
  783.     END;
  784.  
  785.     DETGetPropertyNumberBlockPtr = ^DETGetPropertyNumberBlock;
  786.     DETGetPropertyNumberBlock = RECORD
  787.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  788.         target:                    DETTargetSpecification;                    {  The target for the request  }
  789.         property:                INTEGER;                                {  The property to apply the request to  }
  790.         propertyValue:            LONGINT;                                {  <-  The value of the property  }
  791.     END;
  792.  
  793.     DETGetPropertyRStringBlockPtr = ^DETGetPropertyRStringBlock;
  794.     DETGetPropertyRStringBlock = RECORD
  795.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  796.         target:                    DETTargetSpecification;                    {  The target for the request  }
  797.         property:                INTEGER;                                {  The property to apply the request to  }
  798.         propertyValue:            RStringHandle;                            {  <-  A handle containing the property (as an RString) (caller must DisposHandle() when done)  }
  799.     END;
  800.  
  801.     DETGetPropertyBinarySizeBlockPtr = ^DETGetPropertyBinarySizeBlock;
  802.     DETGetPropertyBinarySizeBlock = RECORD
  803.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  804.         target:                    DETTargetSpecification;                    {  The target for the request  }
  805.         property:                INTEGER;                                {  The property to apply the request to  }
  806.         propertyBinarySize:        LONGINT;                                {  <-  The size of the property as a binary block  }
  807.     END;
  808.  
  809.     DETGetPropertyBinaryBlockPtr = ^DETGetPropertyBinaryBlock;
  810.     DETGetPropertyBinaryBlock = RECORD
  811.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  812.         target:                    DETTargetSpecification;                    {  The target for the request  }
  813.         property:                INTEGER;                                {  The property to apply the request to  }
  814.         propertyValue:            Handle;                                    {  <-  Handle with the value of the property (caller must DisposHandle() when done)  }
  815.     END;
  816.  
  817.     DETGetPropertyChangedBlockPtr = ^DETGetPropertyChangedBlock;
  818.     DETGetPropertyChangedBlock = RECORD
  819.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  820.         target:                    DETTargetSpecification;                    {  The target for the request  }
  821.         property:                INTEGER;                                {  The property to apply the request to  }
  822.         propertyChanged:        BOOLEAN;                                {  <-  True if the property is marked as changed  }
  823.         filler1:                BOOLEAN;
  824.     END;
  825.  
  826.     DETGetPropertyEditableBlockPtr = ^DETGetPropertyEditableBlock;
  827.     DETGetPropertyEditableBlock = RECORD
  828.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  829.         target:                    DETTargetSpecification;                    {  The target for the request  }
  830.         property:                INTEGER;                                {  The property to apply the request to  }
  831.         propertyEditable:        BOOLEAN;                                {  <-  True if the property can be edited by the user (if false, view will appear disabled)  }
  832.         filler1:                BOOLEAN;
  833.     END;
  834.  
  835.     DETSetPropertyTypeBlockPtr = ^DETSetPropertyTypeBlock;
  836.     DETSetPropertyTypeBlock = RECORD
  837.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  838.         target:                    DETTargetSpecification;                    {  The target for the request  }
  839.         property:                INTEGER;                                {  The property to apply the request to  }
  840.         newType:                INTEGER;                                {   -> New type for property (just sets type, does not convert contents)  }
  841.     END;
  842.  
  843.     DETSetPropertyNumberBlockPtr = ^DETSetPropertyNumberBlock;
  844.     DETSetPropertyNumberBlock = RECORD
  845.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  846.         target:                    DETTargetSpecification;                    {  The target for the request  }
  847.         property:                INTEGER;                                {  The property to apply the request to  }
  848.         newValue:                LONGINT;                                {   -> New value to set property to (and set type to number)  }
  849.     END;
  850.  
  851.     DETSetPropertyRStringBlockPtr = ^DETSetPropertyRStringBlock;
  852.     DETSetPropertyRStringBlock = RECORD
  853.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  854.         target:                    DETTargetSpecification;                    {  The target for the request  }
  855.         property:                INTEGER;                                {  The property to apply the request to  }
  856.         newValue:                RStringPtr;                                {   -> New value to set property to (and set type to RString)  }
  857.     END;
  858.  
  859.     DETSetPropertyBinaryBlockPtr = ^DETSetPropertyBinaryBlock;
  860.     DETSetPropertyBinaryBlock = RECORD
  861.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  862.         target:                    DETTargetSpecification;                    {  The target for the request  }
  863.         property:                INTEGER;                                {  The property to apply the request to  }
  864.         newValue:                Ptr;                                    {   -> New value to set property to (and set type to binary)  }
  865.         newValueSize:            LONGINT;                                {   -> Size of new value  }
  866.     END;
  867.  
  868.     DETSetPropertyChangedBlockPtr = ^DETSetPropertyChangedBlock;
  869.     DETSetPropertyChangedBlock = RECORD
  870.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  871.         target:                    DETTargetSpecification;                    {  The target for the request  }
  872.         property:                INTEGER;                                {  The property to apply the request to  }
  873.         propertyChanged:        BOOLEAN;                                {   -> Value to set changed flag on property to  }
  874.         filler1:                BOOLEAN;
  875.     END;
  876.  
  877.     DETSetPropertyEditableBlockPtr = ^DETSetPropertyEditableBlock;
  878.     DETSetPropertyEditableBlock = RECORD
  879.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  880.         target:                    DETTargetSpecification;                    {  The target for the request  }
  881.         property:                INTEGER;                                {  The property to apply the request to  }
  882.         propertyEditable:        BOOLEAN;                                {   -> Value to set editable flag on property to  }
  883.         filler1:                BOOLEAN;
  884.     END;
  885.  
  886.     DETDirtyPropertyBlockPtr = ^DETDirtyPropertyBlock;
  887.     DETDirtyPropertyBlock = RECORD
  888.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  889.         target:                    DETTargetSpecification;                    {  The target for the request  }
  890.         property:                INTEGER;                                {  The property to apply the request to  }
  891.     END;
  892.  
  893.     DETDoPropertyCommandBlockPtr = ^DETDoPropertyCommandBlock;
  894.     DETDoPropertyCommandBlock = RECORD
  895.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  896.         target:                    DETTargetSpecification;                    {  The target for the request  }
  897.         property:                INTEGER;                                {  The property to apply the request to  }
  898.         parameter:                LONGINT;                                {  ->  Parameter of command  }
  899.     END;
  900.  
  901.     DETSublistCountBlockPtr = ^DETSublistCountBlock;
  902.     DETSublistCountBlock = RECORD
  903.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  904.         target:                    DETTargetSpecification;                    {  The target for the request  }
  905.         count:                    LONGINT;                                {  <-  The number of items in the current item's sublist  }
  906.     END;
  907.  
  908.     DETSelectedSublistCountBlockPtr = ^DETSelectedSublistCountBlock;
  909.     DETSelectedSublistCountBlock = RECORD
  910.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  911.         target:                    DETTargetSpecification;                    {  The target for the request  }
  912.         count:                    LONGINT;                                {  <-  The number of selected items in the current item's sublist  }
  913.     END;
  914.  
  915.     DETRequestSyncBlockPtr = ^DETRequestSyncBlock;
  916.     DETRequestSyncBlock = RECORD
  917.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  918.         target:                    DETTargetSpecification;                    {  The target for the request  }
  919.     END;
  920.  
  921.     DETAddMenuBlockPtr = ^DETAddMenuBlock;
  922.     DETAddMenuBlock = RECORD
  923.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  924.         target:                    DETTargetSpecification;                    {  The target for the request  }
  925.         property:                INTEGER;                                {  The property to apply the request to  }
  926.         name:                    RStringPtr;                                {   -> Name of new menu item  }
  927.         parameter:                LONGINT;                                {   -> Parameter to return when this item is selected  }
  928.         addAfter:                LONGINT;                                {   -> Parameter of entry to add after, or -1 for add at end  }
  929.     END;
  930.  
  931.     DETRemoveMenuBlockPtr = ^DETRemoveMenuBlock;
  932.     DETRemoveMenuBlock = RECORD
  933.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  934.         target:                    DETTargetSpecification;                    {  The target for the request  }
  935.         property:                INTEGER;                                {  The property to apply the request to  }
  936.         itemToRemove:            LONGINT;                                {   -> Parameter of menu item to remove  }
  937.     END;
  938.  
  939.     DETMenuItemRStringBlockPtr = ^DETMenuItemRStringBlock;
  940.     DETMenuItemRStringBlock = RECORD
  941.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  942.         target:                    DETTargetSpecification;                    {  The target for the request  }
  943.         property:                INTEGER;                                {  The property to apply the request to  }
  944.         itemParameter:            LONGINT;                                {   -> Parameter of menu item to return string for  }
  945.         rString:                RStringHandle;                            {  <-  Handle with the RString (caller must DisposHandle() when done)  }
  946.     END;
  947.  
  948.     DETOpenDSSpecBlockPtr = ^DETOpenDSSpecBlock;
  949.     DETOpenDSSpecBlock = RECORD
  950.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  951.         dsSpec:                    PackedDSSpecPtr;                        {   -> DSSpec of object to be opened  }
  952.     END;
  953.  
  954.     DETAboutToTalkBlockPtr = ^DETAboutToTalkBlock;
  955.     DETAboutToTalkBlock = RECORD
  956.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  957.     END;
  958.  
  959.     DETBreakAttributeBlockPtr = ^DETBreakAttributeBlock;
  960.     DETBreakAttributeBlock = RECORD
  961.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  962.         target:                    DETTargetSpecification;                    {  The target for the request  }
  963.         breakAttribute:            AttributePtr;                            {   -> Attribute to parse  }
  964.         isChangeable:            BOOLEAN;                                {   -> True if the value can be changed by the user  }
  965.         filler1:                BOOLEAN;
  966.     END;
  967.  
  968.     DETSavePropertyBlockPtr = ^DETSavePropertyBlock;
  969.     DETSavePropertyBlock = RECORD
  970.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  971.         target:                    DETTargetSpecification;                    {  The target for the request  }
  972.         property:                INTEGER;                                {  The property to apply the request to  }
  973.     END;
  974.  
  975.     DETGetCustomViewUserReferenceBlockPtr = ^DETGetCustomViewUserReferenceBlock;
  976.     DETGetCustomViewUserReferenceBlock = RECORD
  977.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  978.         target:                    DETTargetSpecification;                    {  The target for the request  }
  979.         property:                INTEGER;                                {  The property to apply the request to  }
  980.         userReference:            INTEGER;                                {  <-  User reference value, as specified in the .r file  }
  981.     END;
  982.  
  983.     DETGetCustomViewBoundsBlockPtr = ^DETGetCustomViewBoundsBlock;
  984.     DETGetCustomViewBoundsBlock = RECORD
  985.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  986.         target:                    DETTargetSpecification;                    {  The target for the request  }
  987.         property:                INTEGER;                                {  The property to apply the request to  }
  988.         bounds:                    Rect;                                    {  <-  Bounds of the view  }
  989.     END;
  990.  
  991.     DETGetResourceBlockPtr = ^DETGetResourceBlock;
  992.     DETGetResourceBlock = RECORD
  993.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  994.         target:                    DETTargetSpecification;                    {  The target for the request  }
  995.         property:                INTEGER;                                {  The property to apply the request to  }
  996.         resourceType:            ResType;                                {   -> Resource type  }
  997.         theResource:            Handle;                                    {  <-  The resource handle (caller must dispose when done)  }
  998.     END;
  999.  
  1000.     DETTemplateCountsPtr = ^DETTemplateCounts;
  1001.     DETTemplateCounts = RECORD
  1002.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1003.         aspectTemplateCount:    LONGINT;                                {  <-  Number of aspect templates in the system  }
  1004.         infoPageTemplateCount:    LONGINT;                                {  <-  Number of info-page templates in the system  }
  1005.     END;
  1006.  
  1007.     DETUnloadTemplatesBlockPtr = ^DETUnloadTemplatesBlock;
  1008.     DETUnloadTemplatesBlock = RECORD
  1009.         reqFunction:            DETCallBackFunctions;                    {  Requested function  }
  1010.     END;
  1011.  
  1012.  
  1013.     DETCallBackBlockPtr = ^DETCallBackBlock;
  1014.     DETCallBackBlock = RECORD
  1015.         CASE INTEGER OF
  1016.         0: (
  1017.             protoCallBack:        DETProtoCallBackBlock;
  1018.             );
  1019.         1: (
  1020.             beep:                DETBeepBlock;
  1021.             );
  1022.         2: (
  1023.             busy:                DETBusyBlock;
  1024.             );
  1025.         3: (
  1026.             changeCallFors:        DETChangeCallForsBlock;
  1027.             );
  1028.         4: (
  1029.             getCommandSelectionCount: DETGetCommandSelectionCountBlock;
  1030.             );
  1031.         5: (
  1032.             getCommandItemN:    DETGetCommandItemNBlock;
  1033.             );
  1034.         6: (
  1035.             getDSSpec:            DETGetDSSpecBlock;
  1036.             );
  1037.         7: (
  1038.             getTemplateFSSpec:    DETGetTemplateFSSpecBlock;
  1039.             );
  1040.         8: (
  1041.             getOpenEdit:        DETGetOpenEditBlock;
  1042.             );
  1043.         9: (
  1044.             closeEdit:            DETCloseEditBlock;
  1045.             );
  1046.         10: (
  1047.             getPropertyType:    DETGetPropertyTypeBlock;
  1048.             );
  1049.         11: (
  1050.             getPropertyNumber:    DETGetPropertyNumberBlock;
  1051.             );
  1052.         12: (
  1053.             getPropertyRString:    DETGetPropertyRStringBlock;
  1054.             );
  1055.         13: (
  1056.             getPropertyBinarySize: DETGetPropertyBinarySizeBlock;
  1057.             );
  1058.         14: (
  1059.             getPropertyBinary:    DETGetPropertyBinaryBlock;
  1060.             );
  1061.         15: (
  1062.             getPropertyChanged:    DETGetPropertyChangedBlock;
  1063.             );
  1064.         16: (
  1065.             getPropertyEditable: DETGetPropertyEditableBlock;
  1066.             );
  1067.         17: (
  1068.             setPropertyType:    DETSetPropertyTypeBlock;
  1069.             );
  1070.         18: (
  1071.             setPropertyNumber:    DETSetPropertyNumberBlock;
  1072.             );
  1073.         19: (
  1074.             setPropertyRString:    DETSetPropertyRStringBlock;
  1075.             );
  1076.         20: (
  1077.             setPropertyBinary:    DETSetPropertyBinaryBlock;
  1078.             );
  1079.         21: (
  1080.             setPropertyChanged:    DETSetPropertyChangedBlock;
  1081.             );
  1082.         22: (
  1083.             setPropertyEditable: DETSetPropertyEditableBlock;
  1084.             );
  1085.         23: (
  1086.             dirtyProperty:        DETDirtyPropertyBlock;
  1087.             );
  1088.         24: (
  1089.             doPropertyCommand:    DETDoPropertyCommandBlock;
  1090.             );
  1091.         25: (
  1092.             sublistCount:        DETSublistCountBlock;
  1093.             );
  1094.         26: (
  1095.             selectedSublistCount: DETSelectedSublistCountBlock;
  1096.             );
  1097.         27: (
  1098.             requestSync:        DETRequestSyncBlock;
  1099.             );
  1100.         28: (
  1101.             addMenu:            DETAddMenuBlock;
  1102.             );
  1103.         29: (
  1104.             removeMenu:            DETRemoveMenuBlock;
  1105.             );
  1106.         30: (
  1107.             menuItemRString:    DETMenuItemRStringBlock;
  1108.             );
  1109.         31: (
  1110.             openDSSpec:            DETOpenDSSpecBlock;
  1111.             );
  1112.         32: (
  1113.             aboutToTalk:        DETAboutToTalkBlock;
  1114.             );
  1115.         33: (
  1116.             breakAttribute:        DETBreakAttributeBlock;
  1117.             );
  1118.         34: (
  1119.             saveProperty:        DETSavePropertyBlock;
  1120.             );
  1121.         35: (
  1122.             getCustomViewUserReference: DETGetCustomViewUserReferenceBlock;
  1123.             );
  1124.         36: (
  1125.             getCustomViewBounds: DETGetCustomViewBoundsBlock;
  1126.             );
  1127.         37: (
  1128.             getResource:        DETGetResourceBlock;
  1129.             );
  1130.         38: (
  1131.             templateCounts:        DETTemplateCounts;
  1132.             );
  1133.         39: (
  1134.             unloadTemplates:    DETUnloadTemplatesBlock;
  1135.             );
  1136.     END;
  1137.  
  1138.     DETCallBlockPtr = ^DETCallBlock;
  1139.     DETCallBackProcPtr = ProcPtr;  { FUNCTION DETCallBack(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr): OSErr; }
  1140.  
  1141.     DETCallBackUPP = UniversalProcPtr;
  1142.     DETCallBack                            = DETCallBackUPP;
  1143.     DETProtoCallBlockPtr = ^DETProtoCallBlock;
  1144.     DETProtoCallBlock = RECORD
  1145.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1146.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1147.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1148.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1149.                                                                         {     common to all invocations of code resource)  }
  1150.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1151.                                                                         {     code resource)  }
  1152.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1153.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1154.         filler1:                BOOLEAN;
  1155.         property:                INTEGER;                                {  The property number the call refers to  }
  1156.     END;
  1157.  
  1158.     DETInitBlockPtr = ^DETInitBlock;
  1159.     DETInitBlock = RECORD
  1160.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1161.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1162.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1163.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1164.         newCallFors:            LONGINT;                                {  <-  New call-for mask  }
  1165.     END;
  1166.  
  1167.     DETExitBlockPtr = ^DETExitBlock;
  1168.     DETExitBlock = RECORD
  1169.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1170.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1171.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1172.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1173.     END;
  1174.  
  1175.     DETInstanceInitBlockPtr = ^DETInstanceInitBlock;
  1176.     DETInstanceInitBlock = RECORD
  1177.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1178.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1179.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1180.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1181.                                                                         {     common to all invocations of code resource)  }
  1182.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1183.                                                                         {     code resource)  }
  1184.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1185.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1186.         filler1:                BOOLEAN;
  1187.     END;
  1188.  
  1189.     DETInstanceExitBlockPtr = ^DETInstanceExitBlock;
  1190.     DETInstanceExitBlock = RECORD
  1191.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1192.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1193.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1194.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1195.                                                                         {     common to all invocations of code resource)  }
  1196.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1197.                                                                         {     code resource)  }
  1198.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1199.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1200.         filler1:                BOOLEAN;
  1201.     END;
  1202.  
  1203.     DETInstanceIdleBlockPtr = ^DETInstanceIdleBlock;
  1204.     DETInstanceIdleBlock = RECORD
  1205.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1206.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1207.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1208.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1209.                                                                         {     common to all invocations of code resource)  }
  1210.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1211.                                                                         {     code resource)  }
  1212.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1213.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1214.         filler1:                BOOLEAN;
  1215.     END;
  1216.  
  1217.     DETPropertyCommandBlockPtr = ^DETPropertyCommandBlock;
  1218.     DETPropertyCommandBlock = RECORD
  1219.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1220.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1221.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1222.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1223.                                                                         {     common to all invocations of code resource)  }
  1224.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1225.                                                                         {     code resource)  }
  1226.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1227.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1228.         filler1:                BOOLEAN;
  1229.         property:                INTEGER;                                {  The property number the call refers to  }
  1230.         parameter:                LONGINT;                                {   -> Parameter of command  }
  1231.     END;
  1232.  
  1233.     DETMaximumTextLengthBlockPtr = ^DETMaximumTextLengthBlock;
  1234.     DETMaximumTextLengthBlock = RECORD
  1235.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1236.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1237.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1238.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1239.                                                                         {     common to all invocations of code resource)  }
  1240.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1241.                                                                         {     code resource)  }
  1242.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1243.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1244.         filler1:                BOOLEAN;
  1245.         property:                INTEGER;                                {  The property number the call refers to  }
  1246.         maxSize:                LONGINT;                                {  <-  Return the maximum number of characters the user can entry when property is edited in an EditText  }
  1247.     END;
  1248.  
  1249.     DETViewListChangedBlockPtr = ^DETViewListChangedBlock;
  1250.     DETViewListChangedBlock = RECORD
  1251.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1252.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1253.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1254.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1255.                                                                         {     common to all invocations of code resource)  }
  1256.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1257.                                                                         {     code resource)  }
  1258.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1259.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1260.         filler1:                BOOLEAN;
  1261.     END;
  1262.  
  1263.     DETPropertyDirtiedBlockPtr = ^DETPropertyDirtiedBlock;
  1264.     DETPropertyDirtiedBlock = RECORD
  1265.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1266.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1267.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1268.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1269.                                                                         {     common to all invocations of code resource)  }
  1270.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1271.                                                                         {     code resource)  }
  1272.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1273.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1274.         filler1:                BOOLEAN;
  1275.         property:                INTEGER;                                {  The property number the call refers to  }
  1276.     END;
  1277.  
  1278.     DETValidateSaveBlockPtr = ^DETValidateSaveBlock;
  1279.     DETValidateSaveBlock = RECORD
  1280.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1281.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1282.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1283.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1284.                                                                         {     common to all invocations of code resource)  }
  1285.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1286.                                                                         {     code resource)  }
  1287.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1288.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1289.         filler1:                BOOLEAN;
  1290.         errorString:            RStringHandle;                            {  <-  Handle with error string if validation fails (callee must allocate handle, DE will DisposHandle() it)  }
  1291.     END;
  1292.  
  1293.     DETDropQueryBlockPtr = ^DETDropQueryBlock;
  1294.     DETDropQueryBlock = RECORD
  1295.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1296.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1297.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1298.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1299.                                                                         {     common to all invocations of code resource)  }
  1300.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1301.                                                                         {     code resource)  }
  1302.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1303.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1304.         filler1:                BOOLEAN;
  1305.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1306.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1307.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1308.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1309.         filler2:                BOOLEAN;
  1310.     END;
  1311.  
  1312.     DETDropMeQueryBlockPtr = ^DETDropMeQueryBlock;
  1313.     DETDropMeQueryBlock = RECORD
  1314.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1315.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1316.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1317.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1318.                                                                         {     common to all invocations of code resource)  }
  1319.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1320.                                                                         {     code resource)  }
  1321.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1322.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1323.         filler1:                BOOLEAN;
  1324.         modifiers:                INTEGER;                                {   -> Modifiers at drop time (option/control/command/shift keys)  }
  1325.         commandID:                LONGINT;                                {  <-> Command ID (kDETDoNothing, kDETMove, kDETDrag (copy), kDETAlias, or a property number)  }
  1326.         destinationType:        AttributeType;                            {  <-> Type to convert attribute to  }
  1327.         copyToHFS:                BOOLEAN;                                {  <-  If true, object should be copied to HFS before being operated on, and deleted after  }
  1328.         filler2:                BOOLEAN;
  1329.     END;
  1330.  
  1331.     DETAttributeCreationBlockPtr = ^DETAttributeCreationBlock;
  1332.     DETAttributeCreationBlock = RECORD
  1333.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1334.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1335.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1336.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1337.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1338.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1339.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1340.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1341.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1342.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1343.     END;
  1344.  
  1345.     DETAttributeNewBlockPtr = ^DETAttributeNewBlock;
  1346.     DETAttributeNewBlock = RECORD
  1347.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1348.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1349.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1350.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1351.                                                                         {     common to all invocations of code resource)  }
  1352.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1353.                                                                         {     code resource)  }
  1354.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1355.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1356.         filler1:                BOOLEAN;
  1357.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1358.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1359.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1360.         attrType:                AttributeType;                            {  <-> The type of the attribute being created  }
  1361.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being created  }
  1362.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1363.     END;
  1364.  
  1365.     DETAttributeChangeBlockPtr = ^DETAttributeChangeBlock;
  1366.     DETAttributeChangeBlock = RECORD
  1367.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1368.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1369.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1370.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1371.                                                                         {     common to all invocations of code resource)  }
  1372.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1373.                                                                         {     code resource)  }
  1374.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1375.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1376.         filler1:                BOOLEAN;
  1377.         parent:                    PackedDSSpecPtr;                        {   -> The object within which the creation will occur  }
  1378.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1379.         identity:                AuthIdentity;                            {   -> The identity we're browsing as in the parent object  }
  1380.         attrType:                AttributeType;                            {  <-> The type of the attribute being changed  }
  1381.         attrTag:                AttributeTag;                            {  <-> The tag of the attribute being changed  }
  1382.         attrCID:                AttributeCreationID;                    {  <-> The CID of the attribute being changed  }
  1383.         value:                    Handle;                                    {  <-> The value to write (pre-allocated, resize as needed)  }
  1384.     END;
  1385.  
  1386.     DETAttributeDeleteBlockPtr = ^DETAttributeDeleteBlock;
  1387.     DETAttributeDeleteBlock = RECORD
  1388.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1389.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1390.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1391.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1392.                                                                         {     common to all invocations of code resource)  }
  1393.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1394.                                                                         {     code resource)  }
  1395.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1396.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1397.         filler1:                BOOLEAN;
  1398.         dsSpec:                    PackedDSSpecPtr;                        {   -> The object which will be deleted  }
  1399.         refNum:                    INTEGER;                                {   -> Refnum for returned address (DSSpecs in PDs only)  }
  1400.         identity:                AuthIdentity;                            {   -> The identity we're browsing as  }
  1401.     END;
  1402.  
  1403.     DETItemNewBlockPtr = ^DETItemNewBlock;
  1404.     DETItemNewBlock = RECORD
  1405.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1406.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1407.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1408.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1409.                                                                         {     common to all invocations of code resource)  }
  1410.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1411.                                                                         {     code resource)  }
  1412.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1413.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1414.         filler1:                BOOLEAN;
  1415.     END;
  1416.  
  1417.     DETShouldSyncBlockPtr = ^DETShouldSyncBlock;
  1418.     DETShouldSyncBlock = RECORD
  1419.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1420.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1421.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1422.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1423.                                                                         {     common to all invocations of code resource)  }
  1424.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1425.                                                                         {     code resource)  }
  1426.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1427.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1428.         filler1:                BOOLEAN;
  1429.         shouldSync:                BOOLEAN;                                {  <-  True if we should now sync with catalog  }
  1430.         filler2:                BOOLEAN;
  1431.     END;
  1432.  
  1433.     DETDoSyncBlockPtr = ^DETDoSyncBlock;
  1434.     DETDoSyncBlock = RECORD
  1435.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1436.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1437.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1438.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1439.                                                                         {     common to all invocations of code resource)  }
  1440.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1441.                                                                         {     code resource)  }
  1442.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1443.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1444.         filler1:                BOOLEAN;
  1445.     END;
  1446.  
  1447.     DETPatternInBlockPtr = ^DETPatternInBlock;
  1448.     DETPatternInBlock = RECORD
  1449.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1450.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1451.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1452.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1453.                                                                         {     common to all invocations of code resource)  }
  1454.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1455.                                                                         {     code resource)  }
  1456.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1457.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1458.         filler1:                BOOLEAN;
  1459.         property:                INTEGER;                                {  The property number the call refers to  }
  1460.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1461.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1462.         attribute:                AttributePtr;                            {   -> The complete attribute  }
  1463.         dataOffset:                LONGINT;                                {  <-> Offset to current (next) byte  }
  1464.         bitOffset:                INTEGER;                                {  <-> Bit offset (next bit is *fData >> fBitOffset++)  }
  1465.     END;
  1466.  
  1467.     DETPatternOutBlockPtr = ^DETPatternOutBlock;
  1468.     DETPatternOutBlock = RECORD
  1469.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1470.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1471.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1472.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1473.                                                                         {     common to all invocations of code resource)  }
  1474.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1475.                                                                         {     code resource)  }
  1476.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1477.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1478.         filler1:                BOOLEAN;
  1479.         property:                INTEGER;                                {  The property number the call refers to  }
  1480.         elementType:            LONGINT;                                {   -> Element type from pattern  }
  1481.         extra:                    LONGINT;                                {   -> Extra field from pattern  }
  1482.         attribute:                AttributePtr;                            {   -> The attribute (minus the data portion)  }
  1483.         data:                    Handle;                                    {   -> Data to be written (pre-allocated, resize and add at end)  }
  1484.         dataOffset:                LONGINT;                                {  <-> Offset to next byte to write  }
  1485.         bitOffset:                INTEGER;                                {  <-> Bit offset (if zero, handle will need to be resized to one more byte before write)  }
  1486.     END;
  1487.  
  1488.     DETOpenSelfBlockPtr = ^DETOpenSelfBlock;
  1489.     DETOpenSelfBlock = RECORD
  1490.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1491.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1492.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1493.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1494.                                                                         {     common to all invocations of code resource)  }
  1495.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1496.                                                                         {     code resource)  }
  1497.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1498.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1499.         filler1:                BOOLEAN;
  1500.         modifiers:                INTEGER;                                {   -> Modifiers at open time (option/control/command/shift keys)  }
  1501.     END;
  1502.  
  1503.     DETConvertToNumberBlockPtr = ^DETConvertToNumberBlock;
  1504.     DETConvertToNumberBlock = RECORD
  1505.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1506.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1507.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1508.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1509.                                                                         {     common to all invocations of code resource)  }
  1510.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1511.                                                                         {     code resource)  }
  1512.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1513.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1514.         filler1:                BOOLEAN;
  1515.         property:                INTEGER;                                {  The property number the call refers to  }
  1516.         theValue:                LONGINT;                                {  <-  The converted value to return  }
  1517.     END;
  1518.  
  1519.     DETConvertToRStringBlockPtr = ^DETConvertToRStringBlock;
  1520.     DETConvertToRStringBlock = RECORD
  1521.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1522.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1523.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1524.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1525.                                                                         {     common to all invocations of code resource)  }
  1526.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1527.                                                                         {     code resource)  }
  1528.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1529.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1530.         filler1:                BOOLEAN;
  1531.         property:                INTEGER;                                {  The property number the call refers to  }
  1532.         theValue:                RStringHandle;                            {  <-  A handle with the converted value (callee must allocate handle, DE will DisposHandle() it)  }
  1533.     END;
  1534.  
  1535.     DETConvertFromNumberBlockPtr = ^DETConvertFromNumberBlock;
  1536.     DETConvertFromNumberBlock = RECORD
  1537.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1538.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1539.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1540.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1541.                                                                         {     common to all invocations of code resource)  }
  1542.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1543.                                                                         {     code resource)  }
  1544.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1545.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1546.         filler1:                BOOLEAN;
  1547.         property:                INTEGER;                                {  The property number the call refers to  }
  1548.         theValue:                LONGINT;                                {   -> The value to convert (result should be written direct to the property)  }
  1549.     END;
  1550.  
  1551.     DETConvertFromRStringBlockPtr = ^DETConvertFromRStringBlock;
  1552.     DETConvertFromRStringBlock = RECORD
  1553.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1554.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1555.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1556.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1557.                                                                         {     common to all invocations of code resource)  }
  1558.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1559.                                                                         {     code resource)  }
  1560.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1561.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1562.         filler1:                BOOLEAN;
  1563.         property:                INTEGER;                                {  The property number the call refers to  }
  1564.         theValue:                RStringPtr;                                {   -> The value to convert (result should be written direct to the property)  }
  1565.     END;
  1566.  
  1567.     DETCustomViewDrawBlockPtr = ^DETCustomViewDrawBlock;
  1568.     DETCustomViewDrawBlock = RECORD
  1569.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1570.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1571.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1572.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1573.                                                                         {     common to all invocations of code resource)  }
  1574.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1575.                                                                         {     code resource)  }
  1576.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1577.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1578.         filler1:                BOOLEAN;
  1579.         property:                INTEGER;                                {  The property number the call refers to  }
  1580.     END;
  1581.  
  1582.     DETCustomViewMouseDownBlockPtr = ^DETCustomViewMouseDownBlock;
  1583.     DETCustomViewMouseDownBlock = RECORD
  1584.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1585.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1586.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1587.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1588.                                                                         {     common to all invocations of code resource)  }
  1589.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1590.                                                                         {     code resource)  }
  1591.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1592.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1593.         filler1:                BOOLEAN;
  1594.         property:                INTEGER;                                {  The property number the call refers to  }
  1595.         theEvent:                EventRecordPtr;                            {   -> The original event record of the mouse-down  }
  1596.     END;
  1597.  
  1598.     DETKeyPressBlockPtr = ^DETKeyPressBlock;
  1599.     DETKeyPressBlock = RECORD
  1600.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1601.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1602.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1603.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1604.                                                                         {     common to all invocations of code resource)  }
  1605.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1606.                                                                         {     code resource)  }
  1607.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1608.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1609.         filler1:                BOOLEAN;
  1610.         property:                INTEGER;                                {  The property number the call refers to  }
  1611.         theEvent:                EventRecordPtr;                            {   -> The original event record of the key-press  }
  1612.     END;
  1613.  
  1614.     DETPasteBlockPtr = ^DETPasteBlock;
  1615.     DETPasteBlock = RECORD
  1616.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1617.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1618.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1619.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1620.                                                                         {     common to all invocations of code resource)  }
  1621.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1622.                                                                         {     code resource)  }
  1623.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1624.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1625.         filler1:                BOOLEAN;
  1626.         property:                INTEGER;                                {  The property number the call refers to  }
  1627.         modifiers:                INTEGER;                                {   -> Modifiers at paste time (option/control/command/shift keys)  }
  1628.     END;
  1629.  
  1630.     DETCustomMenuSelectedBlockPtr = ^DETCustomMenuSelectedBlock;
  1631.     DETCustomMenuSelectedBlock = RECORD
  1632.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1633.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1634.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1635.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1636.                                                                         {     common to all invocations of code resource)  }
  1637.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1638.                                                                         {     code resource)  }
  1639.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1640.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1641.         filler1:                BOOLEAN;
  1642.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1643.     END;
  1644.  
  1645.     DETCustomMenuEnabledBlockPtr = ^DETCustomMenuEnabledBlock;
  1646.     DETCustomMenuEnabledBlock = RECORD
  1647.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1648.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1649.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1650.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1651.                                                                         {     common to all invocations of code resource)  }
  1652.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1653.                                                                         {     code resource)  }
  1654.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1655.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1656.         filler1:                BOOLEAN;
  1657.         menuTableParameter:        INTEGER;                                {   -> The "property" field from the custom menu table  }
  1658.         enable:                    BOOLEAN;                                {  <-  Whether to enable the menu item  }
  1659.         filler2:                BOOLEAN;
  1660.     END;
  1661.  
  1662.     DETForwarderListItemPtr = ^DETForwarderListItem;
  1663.     DETForwarderListItem = RECORD
  1664.         next:                    ^DETForwarderListItemPtr;                {  Pointer to next item, or nil  }
  1665.         attributeValueTag:        AttributeTag;                            {  Tag of new templates (0 for none)  }
  1666.         rstrs:                    PackedPathName;                            {  Record type (empty if none), attrbute type (empty if none),list of template names to forward to  }
  1667.     END;
  1668.  
  1669.     DETForwarderListPtr                    = ^DETForwarderListItem;
  1670.     DETForwarderListHandle                = ^DETForwarderListPtr;
  1671.     DETDynamicForwardersBlockPtr = ^DETDynamicForwardersBlock;
  1672.     DETDynamicForwardersBlock = RECORD
  1673.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1674.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1675.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1676.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource, common to all invocations of code resource)  }
  1677.         forwarders:                DETForwarderListHandle;                    {  <-  List of forwaders  }
  1678.     END;
  1679.  
  1680.     DETDynamicResourceBlockPtr = ^DETDynamicResourceBlock;
  1681.     DETDynamicResourceBlock = RECORD
  1682.         reqFunction:            DETCallFunctions;                        {  Requested function  }
  1683.         callBack:                DETCallBack;                            {  Pointer to call-back routine  }
  1684.         callBackPrivate:        LONGINT;                                {  Private data for the call-back routine  }
  1685.         templatePrivate:        LONGINT;                                {  Private storage for use by code resource (stays for life of code resource,  }
  1686.                                                                         {     common to all invocations of code resource)  }
  1687.         instancePrivate:        LONGINT;                                {  Private storage for use by code resource (separate for each item using the  }
  1688.                                                                         {     code resource)  }
  1689.         target:                    DETTargetSpecification;                    {  The target (originator) of the call, for targeted and property calls  }
  1690.         targetIsMainAspect:        BOOLEAN;                                {  True if the target is the main aspect (even though it has a non-nil name)  }
  1691.         filler1:                BOOLEAN;
  1692.         resourceType:            ResType;                                {   -> The resource type being requested  }
  1693.         propertyNumber:            INTEGER;                                {   -> The property number of the resource being requested  }
  1694.         resourceID:                INTEGER;                                {   -> The resource ID (base ID + property number) of the resource  }
  1695.         theResource:            Handle;                                    {  <-  The requested resource  }
  1696.     END;
  1697.  
  1698.  
  1699.     DETCallBlock = RECORD
  1700.         CASE INTEGER OF
  1701.         0: (
  1702.             protoCall:            DETProtoCallBlock;
  1703.             );
  1704.         1: (
  1705.             init:                DETInitBlock;
  1706.             );
  1707.         2: (
  1708.             exit:                DETExitBlock;
  1709.             );
  1710.         3: (
  1711.             instanceInit:        DETInstanceInitBlock;
  1712.             );
  1713.         4: (
  1714.             instanceExit:        DETInstanceExitBlock;
  1715.             );
  1716.         5: (
  1717.             instanceIdle:        DETInstanceIdleBlock;
  1718.             );
  1719.         6: (
  1720.             propertyCommand:    DETPropertyCommandBlock;
  1721.             );
  1722.         7: (
  1723.             maximumTextLength:    DETMaximumTextLengthBlock;
  1724.             );
  1725.         8: (
  1726.             viewListChanged:    DETViewListChangedBlock;
  1727.             );
  1728.         9: (
  1729.             propertyDirtied:    DETPropertyDirtiedBlock;
  1730.             );
  1731.         10: (
  1732.             validateSave:        DETValidateSaveBlock;
  1733.             );
  1734.         11: (
  1735.             dropQuery:            DETDropQueryBlock;
  1736.             );
  1737.         12: (
  1738.             dropMeQuery:        DETDropMeQueryBlock;
  1739.             );
  1740.         13: (
  1741.             attributeCreationBlock: DETAttributeCreationBlock;
  1742.             );
  1743.         14: (
  1744.             attributeNew:        DETAttributeNewBlock;
  1745.             );
  1746.         15: (
  1747.             attributeChange:    DETAttributeChangeBlock;
  1748.             );
  1749.         16: (
  1750.             attributeDelete:    DETAttributeDeleteBlock;
  1751.             );
  1752.         17: (
  1753.             itemNew:            DETItemNewBlock;
  1754.             );
  1755.         18: (
  1756.             patternIn:            DETPatternInBlock;
  1757.             );
  1758.         19: (
  1759.             patternOut:            DETPatternOutBlock;
  1760.             );
  1761.         20: (
  1762.             shouldSync:            DETShouldSyncBlock;
  1763.             );
  1764.         21: (
  1765.             doSync:                DETDoSyncBlock;
  1766.             );
  1767.         22: (
  1768.             openSelf:            DETOpenSelfBlock;
  1769.             );
  1770.         23: (
  1771.             convertToNumber:    DETConvertToNumberBlock;
  1772.             );
  1773.         24: (
  1774.             convertToRString:    DETConvertToRStringBlock;
  1775.             );
  1776.         25: (
  1777.             convertFromNumber:    DETConvertFromNumberBlock;
  1778.             );
  1779.         26: (
  1780.             convertFromRString:    DETConvertFromRStringBlock;
  1781.             );
  1782.         27: (
  1783.             customViewDraw:        DETCustomViewDrawBlock;
  1784.             );
  1785.         28: (
  1786.             customViewMouseDown: DETCustomViewMouseDownBlock;
  1787.             );
  1788.         29: (
  1789.             keyPress:            DETKeyPressBlock;
  1790.             );
  1791.         30: (
  1792.             paste:                DETPasteBlock;
  1793.             );
  1794.         31: (
  1795.             customMenuSelected:    DETCustomMenuSelectedBlock;
  1796.             );
  1797.         32: (
  1798.             customMenuEnabled:    DETCustomMenuEnabledBlock;
  1799.             );
  1800.         33: (
  1801.             dynamicForwarders:    DETDynamicForwardersBlock;
  1802.             );
  1803.         34: (
  1804.             dynamicResource:    DETDynamicResourceBlock;
  1805.             );
  1806.     END;
  1807.  
  1808.  
  1809. CONST
  1810.     uppDETCallBackProcInfo = $000003E0;
  1811.  
  1812. FUNCTION CallDETCallBackProc(VAR callBlockPtr: DETCallBlock; callBackBlockPtr: DETCallBackBlockPtr; userRoutine: DETCallBackUPP): OSErr;
  1813.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1814.     INLINE $205F, $4E90;
  1815.     {$ENDC}
  1816.  
  1817. FUNCTION NewDETCallBackProc(userRoutine: DETCallBackProcPtr): DETCallBackUPP;
  1818.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1819.     INLINE $2E9F;
  1820.     {$ENDC}
  1821. { Call-for list: }
  1822.  
  1823. CONST
  1824.     kDETCallForOther            = 1;                            {  Call for things not listed below (also auto-enabled by DE if any of the below are enabled)  }
  1825.     kDETCallForIdle                = 2;                            {  kDETcmdIdle  }
  1826.     kDETCallForCommands            = 4;                            {  kDETcmdPropertyCommand, kDETcmdSelfOpen  }
  1827.     kDETCallForViewChanges        = 8;                            {  kDETcmdViewListChanged, kDETcmdPropertyDirtied, kDETcmdMaximumTextLength  }
  1828.     kDETCallForDrops            = $10;                            {  kDETcmdDropQuery, kDETcmdDropMeQuery  }
  1829.     kDETCallForAttributes        = $20;                            {  kDETcmdAttributeCreation, kDETcmdAttributeNew, kDETcmdAttributeChange, kDETcmdAttributeDelete  }
  1830.     kDETCallForValidation        = $40;                            {  kDETcmdValidateSave  }
  1831.     kDETCallForKeyPresses        = $80;                            {  kDETcmdKeyPress and kDETcmdPaste  }
  1832.     kDETCallForResources        = $0100;                        {  kDETcmdDynamicResource  }
  1833.     kDETCallForSyncing            = $0200;                        {  kDETcmdShouldSync, kDETcmdDoSync  }
  1834.     kDETCallForEscalation        = $8000;                        {  All calls escalated from the next lower level  }
  1835.     kDETCallForNothing            = 0;                            {  None of the above  }
  1836.     kDETCallForEverything        = $FFFFFFFF;                    {  All of the above  }
  1837.  
  1838.  
  1839. TYPE
  1840.     DETCallProcPtr = ProcPtr;  { FUNCTION DETCall(callBlockPtr: DETCallBlockPtr): OSErr; }
  1841.  
  1842.     DETCallUPP = UniversalProcPtr;
  1843.  
  1844. CONST
  1845.     uppDETCallProcInfo = $000000E0;
  1846.  
  1847. FUNCTION NewDETCallProc(userRoutine: DETCallProcPtr): DETCallUPP;
  1848.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1849.     INLINE $2E9F;
  1850.     {$ENDC}
  1851.  
  1852. FUNCTION CallDETCallProc(callBlockPtr: DETCallBlockPtr; userRoutine: DETCallUPP): OSErr;
  1853.     {$IFC TARGET_OS_MAC AND TARGET_CPU_68K AND NOT TARGET_RT_MAC_CFM}
  1854.     INLINE $205F, $4E90;
  1855.     {$ENDC}
  1856.  
  1857. TYPE
  1858.     DETCall                                = DETCallUPP;
  1859. { This following macro saves you from having to dig out the call-back pointer from the call block: }
  1860. {**********************************************************************************}
  1861. {******************************** SAM Definitions: ********************************}
  1862. {**********************************************************************************}
  1863. { SAM Developers should use property numbers starting at this point: }
  1864.  
  1865. CONST
  1866.     kSAMFirstDevProperty        = 50;
  1867.  
  1868.  
  1869. {
  1870.     SAM templates have additional resources/properties that are required
  1871.     for interaction with the AOCE Key Chain.
  1872.     
  1873.      Type    Offset                        Description
  1874.      ----    ------                        -----------
  1875.     'rstr'    kSAMAspectUserName            The user name
  1876.     'rstr'    kSAMAspectKind                The kind of SAM
  1877.     'detn'    kSAMAspectCannotDelete        If 0, then the slot cannot be deleted
  1878.     'sami'    kSAMAspectSlotCreationInfo    The info required to create a slot record
  1879. }
  1880.     kSAMAspectUserName            = 41;
  1881.     kSAMAspectKind                = 42;
  1882.     kSAMAspectCannotDelete        = 43;
  1883.     kSAMAspectSlotCreationInfo    = 44;
  1884.  
  1885. {*************************************************************************************
  1886.  ********************************* Admin Definitions: *********************************
  1887.  *************************************************************************************}
  1888.     kDETAdminVersion            = -978;
  1889.  
  1890.  
  1891.  
  1892. {$ALIGN RESET}
  1893. {$POP}
  1894.  
  1895. {$SETC UsingIncludes := OCETemplatesIncludes}
  1896.  
  1897. {$ENDC} {__OCETEMPLATES__}
  1898.  
  1899. {$IFC NOT UsingIncludes}
  1900.  END.
  1901. {$ENDC}
  1902.